﻿using PlusAssistance.Models;
using PlusAssistance.Models.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PlusAssistance.Controllers
{
    public class ClientAssignController : Controller
    {
        //
        // GET: /ClientAssign/

        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public JsonResult GetClientsByUserSelected(string userId)
        {
            var clientModel = new List<ClientModel>();
            clientModel.Add(new ClientModel { Id = "1", CompletedName = "Flavio Pando", Dni = "25793301", CreditCard = "Nevada", Gender = "M", Address = "25 de mayo 2150" });
            clientModel.Add(new ClientModel { Id = "2", CompletedName = "Octavio Motta", Dni = "28596321", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "3", CompletedName = "Jonathan Rodriguez", Dni = "31452589", CreditCard = "Mastercard", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "4", CompletedName = "Sonia Aguirre", Dni = "45879654", CreditCard = "Visa", Gender = "F", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "5", CompletedName = "Gabriel Lujaksuk", Dni = "12875547", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "6", CompletedName = "Leonor Videla", Dni = "36547789", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "7", CompletedName = "Nicolas Pico", Dni = "85249752", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "8", CompletedName = "Nicolas Castro", Dni = "45897521", CreditCard = "Mastercard", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "9", CompletedName = "Cristian Mendez", Dni = "45789321", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "10", CompletedName = "Adriano Segovia", Dni = "75321159", CreditCard = "Nevada", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "11", CompletedName = "Diego Perez", Dni = "87459965", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "12", CompletedName = "Daniela Aguirre", Dni = "24897753", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "13", CompletedName = "Gustavo Pandolfi", Dni = "65987745", CreditCard = "Nevada", Gender = "M", Address = "Manuel Ocantos 838" });
            clientModel.Add(new ClientModel { Id = "14", CompletedName = "Sebastian Romano", Dni = "29548897", CreditCard = "Visa", Gender = "M", Address = "Manuel Ocantos 838" });

            //TODO implementar translate
            //var modelResponse = _translator.Translate<BLResponse<Client>, ResponseModel<ClientModel>>();

            return Json(clientModel, JsonRequestBehavior.AllowGet);
        }

    }
}
